package com.bruce.pattern.creational.singleton;

import lombok.extern.slf4j.Slf4j;

/**
 * <pre>
 *  通过枚举实现多个单例, 但是方法都是一样的
 * </pre>
 * Created by bruce on 2018/11/3 12:11
 */
@Slf4j
public enum EnumManySingletonInstance implements Handler {

    INSTANCE2 {
        @Override
        public void handle() {
            log.info("Enum Singleton2 1");
        }
    },
    
    INSTANCE {
        @Override
        public void handle() {
            log.info("Enum Singleton1 1");
        }
    }


}
